//
//  GetData.m
//  wangyi
//
//  Created by dllo on 15/11/23.
//  Copyright (c) 2015年 liyinkai. All rights reserved.
//

#import "GetData.h"

@implementation GetData
+(NSMutableArray *)GetData:(NSString *)url withNum:(NSString *)num withCollection:(UICollectionView *)collection {
    NSMutableArray *array1 = [[NSMutableArray alloc] init];
    [WebAsk chuan:url withBlock:^(id result) {
        NSArray *array = [result valueForKey:num];
        for (NSDictionary *dic in array) {
            ToutiaoModel *toutiaomodel = [[ToutiaoModel alloc] initWithDic:dic];
            [array1 addObject:toutiaomodel];
        }
        NSLog(@"收货");
        [collection reloadData];
    }];
    return array1;
}
@end
